package pers.dzk.fivelnarow.judge;

import pers.dzk.fivelnarow.player.Player;
import pers.dzk.fivelnarow.window.GameState;

import java.io.Serializable;

/**
 * 裁判
 * @author 丁泽凯
 */
public abstract class JudgeSuper  implements Serializable {
    private Player victoryPlayer;
    private Player failPlayer;
    private boolean over;
    private GameState gameState = GameState.运行中;
    private int timeCount;
    private boolean validTime;
    /**
     * 找胜者和败者
     */
    public abstract void execute();

    public Player getVictoryPlayer() {
        return victoryPlayer;
    }

    public void setVictoryPlayer(Player victoryPlayer) {
        this.victoryPlayer = victoryPlayer;
    }

    public Player getFailPlayer() {
        return failPlayer;
    }

    public void setFailPlayer(Player failPlayer) {
        this.failPlayer = failPlayer;
    }

    public boolean isOver() {
        return over;
    }

    public void setOver(boolean over) {
        this.over = over;
    }

    public GameState getGameState() {
        return gameState;
    }

    public void setGameState(GameState gameState) {
        this.gameState = gameState;
    }

    public int getTimeCount() {
        return timeCount;
    }

    public void setTimeCount(int timeCount) {
        this.timeCount = timeCount;
    }

    public boolean isValidTime() {
        return validTime;
    }

    public void setValidTime(boolean validTime) {
        this.validTime = validTime;
    }
}
